package com.akl.ssmspringboot.utils;

import org.thymeleaf.util.TextUtils;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * @author guoxy
 * @date 2018/12/12 16:46
 * @description
 */
public class DateUtils {

    private static String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";

    public String  currTime(Date date) {
        //设置日期格式
        SimpleDateFormat df = new SimpleDateFormat(DATE_FORMAT);
        // new Date()为获取当前系统时间
        String time = df.format(new Date());
        return time;
    }
} 